#pragma once
#include <vector>

template<size_t N>
class bit_set
{
public:
	bit_set()
	{
		_bs.resize(N / 32 + 1);
	}

	void set(size_t x)
	{
		int i = x / 32;
		int j = x % 32;

		_bs[i] |= 1 << j;
	}

	void reset(size_t x)
	{
		int i = x / 32;
		int j = x % 32;

		_bs[i] &= ~(1 << j);
	}

	bool test(size_t x)
	{
		int i = x / 32;
		int j = x % 32;
		
		return _bs[i] >> j;
	}
private:
	std::vector<int> _bs;
};